/*
 * @lc app=leetcode.cn id=1704 lang=typescript
 *
 * [1704] 判断字符串的两半是否相似
 */

// @lc code=start
function halvesAreAlike(s: string): boolean {
    const temp = "aeiouAEIOU";
    let i = 0;
    let j = s.length - 1;
    let a_count = 0;
    let b_count = 0;
    while (i < j) {
        if (temp.includes(s[i])) a_count++;
        if (temp.includes(s[j])) b_count++;
        i++;
        j--;
    }
    return a_count === b_count;
}
// @lc code=end
